import React from 'react'
import { NavLink } from 'react-router-dom'



import { Header, Login, Nav,LastNav ,MyP,Div} from '../components/indexView'
import A from 'assets/images/my/denglutouxiang@2x.png'
import A2 from 'assets/images/my/touxiang4@2x.png'
import B from 'assets/images/my/wd_mx@2x.png'
import C1 from 'assets/images/my/wd_fbrw@2x.png'
import C2 from 'assets/images/my/wd_wdrw.@2x.png'
import C3 from 'assets/images/my/wd_djxx@2x.png'
import C4 from 'assets/images/my/wd_jbwq@2x.png'
import D1 from 'assets/images/my/heimingdan@2x.png'
import D2 from 'assets/images/my/bangzhuzhongxin@2x.png'
import D3 from 'assets/images/my/yijianfankui@2x.png'
import D4 from 'assets/images/my/shezhi@2x.png'
import DD from 'assets/images/my/youjiantou@2x.png'
import connect from '../../redux-component/connect'


function MyIndexView(props) {
    // console.log(props.isLogin,typeof props.isLogin,props.isLogin=='true')
    console.log(props,111111111111)
    return (
        <>
        <Div>
        <Header>
            {
                <NavLink to='/myChildRouter/informations' >
                    <img src={
                        props.isLogin ? 
                            (props.informationsList ?
                                (props.informationsList.data?'http://laienli.cn:8080/Legang/'+props.informationsList.data.himg
                            :A)
                            :A2)
                        :A
                        } alt="" />
                    {/* <img src={A}></img> */}
                    </NavLink>
            }   
            </Header>
            <Login>
                {
                   props.isLogin?'':( <p className='first-con'>
                    <NavLink to='/myChildRouter/login'>登录</NavLink>
                    <a href="javascript:void(0)">/</a>
                    <NavLink to='/myChildRouter/signin'>注册</NavLink>
                </p>)
                }
               
                <div className='second-con'>
                    <dl>
                        <dt>
                            <NavLink to='/myChildRouter/attention'>关注</NavLink>
                        </dt>
                        <dd>
                            0
                        </dd>
                    </dl>
                    <dl>
                        <dt>
                            <NavLink to='/myChildRouter/fans'>粉丝</NavLink>
                        </dt>
                        <dd>
                            0
                        </dd>
                    </dl>
                </div>
                <div className='third-con'>
                    <dl><NavLink to='/myChildRouter/balance'><dt>￥<em>
                    {
                        props.informationsList ?  
                        (props.informationsList.data?props.informationsList.data.balance : 0.00)
                    : 
                    0.00 }
                    </em></dt><dd>余额</dd> </NavLink> </dl>
                    <dl><dt><NavLink to='/myChildRouter/Bill'><img src={B} alt="" /></NavLink> </dt><dd>明细</dd></dl>
                </div>
            </Login>
            <Nav>
                <dl>
                    <dt><NavLink to='/hallChildRouter/createTaskType'><img src={C1} alt="" /></NavLink></dt>
                    <dd>发布任务</dd>
                </dl>
                <dl>
                    <dt><NavLink to='/myChildRouter/mytask'><img src={C2} alt="" /></NavLink></dt>                    
                    <dd>我的任务</dd>
                </dl>

                <dl>
                    <dt><NavLink to='/myChildRouter/grade'><img src={C3} alt="" /></NavLink></dt>                    
                    <dd>等级信息</dd>
                </dl>
                <dl>
                    <dt><NavLink to='/myChildRouter/baoju'><img src={C4} alt="" /></NavLink></dt>                    
                    <dd>举报维权</dd>
                </dl>
            </Nav>
            <LastNav>
                <MyP><img src={D1} alt=""/><em>黑名单</em><NavLink to='/myChildRouter/black'> <img src={DD} alt=""/></NavLink></MyP>
                <MyP><img src={D2} alt=""/><em>帮助中心</em> <NavLink to='/myChildRouter/help'> <img src={DD} alt=""/></NavLink></MyP>
                <MyP><img src={D3} alt=""/><em>意见反馈</em> <NavLink to='/myChildRouter/suggestion'> <img src={DD} alt=""/></NavLink></MyP>
                <MyP><img src={D4} alt=""/><em>设置</em> <NavLink to='/myChildRouter/set'> <img src={DD} alt=""/></NavLink></MyP>

            </LastNav>
        </Div>
           
        </>
    )
}

export default connect(MyIndexView)
